#ifndef AVR_SPS_H
#define AVR_SPS_H

#include <QMainWindow>
#include <QList>
#include <QSplitter>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QDir>
#include <QPushButton>
#include <QTableView>
#include <QStandardItemModel>

#include "funcblockbase.h"
#include "schematicbase.h"

namespace Ui {
    class AVR_SPS;
}

class AVR_SPS : public QMainWindow
{
    Q_OBJECT

public:
    explicit AVR_SPS(QWidget *parent = 0);
    ~AVR_SPS();

private:
    Ui::AVR_SPS *ui;
	SchematicBase *sch;
	QDockWidget *dockTree;
	QDockWidget *dockToolBar;
	QTreeWidget *tree;
	QDockWidget *dockProperty;
	QTableView *propertyGrid;
	QStandardItemModel *propertyModel;

	QMenu *fileMenu;
	QMenu *winMenu;
	QToolBar *fileToolBar;
	QAction *newAct;
	QAction *openAct;
	QAction *saveAct;
	QAction *exitAct;
        QAction *exportAct;

	QPushButton *btnWire;
	QPushButton *btnKink;

        FuncBlockBase *last_selected_fb;

private slots:
	void newFile();
	void open();
	void save();
        void export_netlist();
	void toolBarSelectWire(bool checked);
	void toolBarSelectKink(bool checked);
	void selectFuncBlockChanged(FuncBlockBase *fb);

protected:
	virtual void resizeEvent(QResizeEvent *);
};

#endif // AVR_SPS_H
